package it.eng.ws.test.stateAction;

import java.util.HashMap;

import javax.xml.ws.BindingProvider;

import it.eng.ws.test.automata.StateAction;
import it.eng.ws.test.exceptions.UAExecutionException;

import com.airline.www.AirlineReservation;
import com.airline.www.Airline_0020Reservation;
import com.airline.www.SequenceNumberGenerator;

public class InitialState extends StateAction{

	@Override
	public void doAction() throws UAExecutionException {
		Airline_0020Reservation service1 = new Airline_0020Reservation();
        AirlineReservation port1 = service1.getAirlineReservationPort();
		((BindingProvider)port1).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true);
		HashMap<String, Object> map = this.getSharedMemory();
		map.put("AirlineReservation", port1);
		map.put("sequence_number", new SequenceNumberGenerator(1));
	/*	Airline_0020Reservation service1 = new Airline_0020Reservation();
        l.info("Create Web Service InitialState...");
        AirlineReservation port1 = service1.getAirlineReservationPort();
        port1.reserveFlight(3, "luca.bianchi@gmail.com", "lucaBianchi");
        */
	}

}
